<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    // instanceof  判断 某个数据 是否是  某个构造函数  的实例 (不是完全正确 后面补充)

    // Array : 构造函数  => 创建实例化对象(new Array) 
    // arr:  数组 =>  通过构造函数(Array)创建的实例化对象  

    /* // var arr = new Array();
    var arr = [];
    console.log(arr instanceof Array);

    // var obj = new Object();
    var obj = {};
    console.log(obj instanceof Object);

    // var reg = new RegExp("day", "ig");
    var reg = /day/ig;
    console.log(reg instanceof RegExp); */


    var str = new String("123123");  //'object'  对象数据类型
    console.log(typeof str, str instanceof String);

    var str = "123123";  // 'string'  => 基本数据类型
    console.log(typeof str, str instanceof String);




</script>

</html>